package com.hg.hggood.vo;

import java.io.Serializable;
import java.util.Date;
/**VO:Value Object,值对象,当进行SELECT查询时,
 * 查询的结果数据多张表中的内容,此时发现结果集不能直接使用某个POJO实体类来接收,
 * POJO实体类不能包含多表查询出来的结果,解决方式是:重新去构建一个新的对象,
 * 这个对象用户存储所查询出来的结果集对应的映射,所以把像这个的对象称之为值对象。*/
/**购物车数据的VO类(Value Object)*/
public class OrderVO implements Serializable {
    private Integer oid;
    private Integer uid;
    private String onum;
    private Integer  status;
    private Date payTime;
    private Integer id;
    private Integer pid;
    private String recvName;
    private String recvPhone;
    private String recvProvince;
    private String recvCity;
    private String recvArea;
    private String recvAddress;
    private Double totalPrice;
    private Date orderTime;
    private String title;
    private String image;
    private Double price;
    private Integer num;

    public Integer getOid() {
        return oid;
    }

    public void setOid(Integer oid) {
        this.oid = oid;
    }

    public Integer getUid() {
        return uid;
    }

    public void setUid(Integer uid) {
        this.uid = uid;
    }

    public String getOnum() {
        return onum;
    }

    public void setOnum(String onum) {
        this.onum = onum;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Date getPayTime() {
        return payTime;
    }

    public void setPayTime(Date payTime) {
        this.payTime = payTime;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getPid() {
        return pid;
    }

    public void setPid(Integer pid) {
        this.pid = pid;
    }

    public String getRecvName() {
        return recvName;
    }

    public void setRecvName(String recvName) {
        this.recvName = recvName;
    }

    public String getRecvPhone() {
        return recvPhone;
    }

    public void setRecvPhone(String recvPhone) {
        this.recvPhone = recvPhone;
    }

    public String getRecvProvince() {
        return recvProvince;
    }

    public void setRecvProvince(String recvProvince) {
        this.recvProvince = recvProvince;
    }

    public String getRecvCity() {
        return recvCity;
    }

    public void setRecvCity(String recvCity) {
        this.recvCity = recvCity;
    }

    public String getRecvArea() {
        return recvArea;
    }

    public void setRecvArea(String recvArea) {
        this.recvArea = recvArea;
    }

    public String getRecvAddress() {
        return recvAddress;
    }

    public void setRecvAddress(String recvAddress) {
        this.recvAddress = recvAddress;
    }

    public Double getTotalPrice() {
        return totalPrice;
    }

    public void setTotalPrice(Double totalPrice) {
        this.totalPrice = totalPrice;
    }

    public Date getOrderTime() {
        return orderTime;
    }

    public void setOrderTime(Date orderTime) {
        this.orderTime = orderTime;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof OrderVO)) return false;

        OrderVO orderVO = (OrderVO) o;

        if (oid != null ? !oid.equals(orderVO.oid) : orderVO.oid != null) return false;
        if (uid != null ? !uid.equals(orderVO.uid) : orderVO.uid != null) return false;
        if (onum != null ? !onum.equals(orderVO.onum) : orderVO.onum != null) return false;
        if (status != null ? !status.equals(orderVO.status) : orderVO.status != null) return false;
        if (payTime != null ? !payTime.equals(orderVO.payTime) : orderVO.payTime != null) return false;
        if (id != null ? !id.equals(orderVO.id) : orderVO.id != null) return false;
        if (pid != null ? !pid.equals(orderVO.pid) : orderVO.pid != null) return false;
        if (recvName != null ? !recvName.equals(orderVO.recvName) : orderVO.recvName != null) return false;
        if (recvPhone != null ? !recvPhone.equals(orderVO.recvPhone) : orderVO.recvPhone != null) return false;
        if (recvProvince != null ? !recvProvince.equals(orderVO.recvProvince) : orderVO.recvProvince != null)
            return false;
        if (recvCity != null ? !recvCity.equals(orderVO.recvCity) : orderVO.recvCity != null) return false;
        if (recvArea != null ? !recvArea.equals(orderVO.recvArea) : orderVO.recvArea != null) return false;
        if (recvAddress != null ? !recvAddress.equals(orderVO.recvAddress) : orderVO.recvAddress != null) return false;
        if (totalPrice != null ? !totalPrice.equals(orderVO.totalPrice) : orderVO.totalPrice != null) return false;
        if (orderTime != null ? !orderTime.equals(orderVO.orderTime) : orderVO.orderTime != null) return false;
        if (title != null ? !title.equals(orderVO.title) : orderVO.title != null) return false;
        if (image != null ? !image.equals(orderVO.image) : orderVO.image != null) return false;
        if (price != null ? !price.equals(orderVO.price) : orderVO.price != null) return false;
        return num != null ? num.equals(orderVO.num) : orderVO.num == null;
    }

    @Override
    public int hashCode() {
        int result = oid != null ? oid.hashCode() : 0;
        result = 31 * result + (uid != null ? uid.hashCode() : 0);
        result = 31 * result + (onum != null ? onum.hashCode() : 0);
        result = 31 * result + (status != null ? status.hashCode() : 0);
        result = 31 * result + (payTime != null ? payTime.hashCode() : 0);
        result = 31 * result + (id != null ? id.hashCode() : 0);
        result = 31 * result + (pid != null ? pid.hashCode() : 0);
        result = 31 * result + (recvName != null ? recvName.hashCode() : 0);
        result = 31 * result + (recvPhone != null ? recvPhone.hashCode() : 0);
        result = 31 * result + (recvProvince != null ? recvProvince.hashCode() : 0);
        result = 31 * result + (recvCity != null ? recvCity.hashCode() : 0);
        result = 31 * result + (recvArea != null ? recvArea.hashCode() : 0);
        result = 31 * result + (recvAddress != null ? recvAddress.hashCode() : 0);
        result = 31 * result + (totalPrice != null ? totalPrice.hashCode() : 0);
        result = 31 * result + (orderTime != null ? orderTime.hashCode() : 0);
        result = 31 * result + (title != null ? title.hashCode() : 0);
        result = 31 * result + (image != null ? image.hashCode() : 0);
        result = 31 * result + (price != null ? price.hashCode() : 0);
        result = 31 * result + (num != null ? num.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return "OrderVO{" +
                "oid=" + oid +
                ", uid=" + uid +
                ", onum='" + onum + '\'' +
                ", status=" + status +
                ", payTime=" + payTime +
                ", id=" + id +
                ", pid=" + pid +
                ", recvName='" + recvName + '\'' +
                ", recvPhone='" + recvPhone + '\'' +
                ", recvProvince='" + recvProvince + '\'' +
                ", recvCity='" + recvCity + '\'' +
                ", recvArea='" + recvArea + '\'' +
                ", recvAddress='" + recvAddress + '\'' +
                ", totalPrice=" + totalPrice +
                ", orderTime=" + orderTime +
                ", title='" + title + '\'' +
                ", image='" + image + '\'' +
                ", price=" + price +
                ", num=" + num +
                '}';
    }
}
